.popup {
  box-sizing: border-box;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  background-color: canvas;
  color: var(--color-gray-900);
  transform-origin: var(--transform-origin);
  transition:
    transform 150ms,
    opacity 150ms;

  &[data-starting-style],
  &[data-ending-style] {
    opacity: 0;
    transform: scale(0.9);
  }

  @media (prefers-color-scheme: light) {
    outline: 1px solid var(--color-gray-200);
    box-shadow:
      0 10px 15px -3px var(--color-gray-200),
      0 4px 6px -4px var(--color-gray-200);
  }

  @media (prefers-color-scheme: dark) {
    outline: 1px solid var(--color-gray-300);
    outline-offset: -1px;
  }
}

.settings {
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trigger {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 4px;
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  outline: 0;
  border: 1px solid var(--color-gray-200);
  border-radius: 0.375rem;
  background-color: var(--color-gray-50);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
  color: var(--color-gray-900);
  user-select: none;

  @media (hover: hover) {
    &:hover {
      background-color: var(--color-gray-100);
    }
  }

  &:active {
    background-color: var(--color-gray-100);
  }

  &[data-popup-open] {
    background-color: var(--color-gray-100);
  }

  &:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: -1px;
  }
}

.singleLineField {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 1.75rem;
}

.multiLineField {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fieldLabel {
  flex: 0 1 max-content;
}

.input {
  width: 100%;
}

.numberInput {
  flex: 0 1 60%;
  max-width: 60%;
}

.select {
  width: 100%;
}
